import request from '@/utils/request'

// 查询练习题目列表
export function listRandomPracticeQuestion(query) {
  return request({
    url: '/exam/randomPracticeQuestion/list',
    method: 'get',
    params: query
  })
}

// 查询练习题目所有列表
export function listAllRandomPracticeQuestion(query) {
  return request({
    url: '/exam/randomPracticeQuestion/listAll',
    method: 'get',
    params: query
  })
}

// 查询练习题目详细
export function getRandomPracticeQuestion(practiceQuestionId) {
  return request({
    url: '/exam/randomPracticeQuestion/getInfo/' + practiceQuestionId,
    method: 'get'
  })
}

// 新增练习题目
export function addRandomPracticeQuestion(data) {
  return request({
    url: '/exam/randomPracticeQuestion/add',
    method: 'post',
    data: data
  })
}

// 修改练习题目
export function updateRandomPracticeQuestion(data) {
  return request({
    url: '/exam/randomPracticeQuestion/edit',
    method: 'post',
    data: data
  })
}

// 删除练习题目
export function delRandomPracticeQuestion(practiceQuestionId) {
  return request({
    url: '/exam/randomPracticeQuestion/remove/' + practiceQuestionId,
    method: 'get'
  })
}
